package com.wpre.mybatisdemo2.mapper;

import com.wpre.mybatisdemo2.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-11-04
 * Time: 13:13
 */

@Mapper
public interface UserInfoXmlMapper {

    //查询
    List<UserInfo> queryAllUser();

    List<UserInfo> queryAllUser2();

    //更新
    Integer updateUser(Integer id, String password);

    //插入
    Integer insertUser(UserInfo userInfo);

    Integer insertUser2(@Param("uf") UserInfo userInfo);

    //删除
    Integer deleteUserById(Integer id);

    //if标签
    Integer insertUserByCondition(UserInfo userInfo);

    //where标签
    List<UserInfo> selectByCondition(UserInfo userInfo);

    //set标签
    Integer updateByCondition(UserInfo userInfo);

    //foreach
    Integer foreachDelete(List<Integer> ids);

}
